System and method for the detection of de-interlacing of scaled video

ABSTRACT

A system, apparatus, and method are provided for a video detector that computes a measure of how much a given video content resembles one of a de-interlaced video content or a progressive video content. More particularly, the present invention determines the position of original and interpolated lines and the scaling factor of an input content whenever that content was scaled after de-interlacing.

The present invention relates to a system and method for a videodetector that computes a measure of how much a given video contentresembles one of a de-interlaced video content or a progressive videocontent. More particularly, the present invention determines theposition of original and interpolated lines and the scaling factor of aninput content whenever that content was scaled after de-interlacing.

Interlacing is widely used to reduce the bandwidth of video signals. Ithas become an integral part of PAL and NTSC standards and is included insome HD standards. The basic idea of interlacing is simple: byalternating the transmission of even and odd lines of consecutiveframes, the resulting bandwidth is halved with respect to the original,so-called progressive, video signal.

The concept of de-interlacing, i.e. the reverse process in which themissing lines are restored, appeared with the first CRT displays withdoubled vertical resolution and became an essential part of theinherently progressive flat panel displays. However, the quality ofmodern de-interlacers varies greatly. With the de-interlacer beingtypically located in the front of the video chain, any artifactsgenerated here will greatly affect algorithms in the back-end.Furthermore, with the video chain being split over various devices, itis typically not known to video processing algorithms whether or not thecontent was previously de-interlaced, and if so, what quality and/orartifacts to expect. In the case of external de-interlacers, such as,e.g., set-top boxes or DVD players with progressive output, suchinformation is lost even to the front-end video processing.

Any knowledge on the type of video signal, i.e. de-interlaced orprogressive, and the actual quality of the de-interlaced result istherefore highly desirable. Previous work has addressed the latterproblem by proposing a no-reference metric for the quality ofde-interlacing. However, the proposed algorithm was limited to verybasic de-interlacing by line-insertion. In this invention, a simple andlow-cost system and method is provided that is able to classify theinput as de-interlaced or progressive for a broad range ofde-interlacers without the need for a reference signal. Moreover, thecurrent invention is robust for spatial scaling and therefore referredto as a DISC detector (De-Interlaced and SCaled) detector. The systemand method of the present invention also indicate the positions oforiginal and interpolated lines and the scaling factor.

The DISC detector can be used in a video chain as, e.g., as depicted inFIG. 1 to provide the control signal to the so-called video engine.However, many other possibilities for integrating the DISC detectorexist. FIG. 1 illustrates only one such possibility.

The DISC detector of the present invention is based upon two simpleobservations:

a. Given the fact that interpolated lines are computed from originallines, their entropy is typically lower; and

b. The positions of original and interpolated lines are complementaryand their positions alternate from frame to frame, i.e. their positionsform a checkerboard pattern on the vertical-temporal plane.

The first observation can be illustrated by considering thede-interlaced output of a mainstream de-interlacer. If one separates thede-interlaced output into two images, one consisting of the originallines and one consisting of the interpolated lines, then one can clearlyobserve that the second image is more blurred, i.e., even and odd linesin the imperfectly de-interlaced frames have different high-frequencystatistics. Hence, certain discriminating functions should exist thatcan discriminate between original and interpolated lines. For example,the following function computed on the positions original lines gives,in general higher values than on interpolated lines

D(y, n) = D₁(y, n) + c₁ * D₂(y, n) + c₂ * D₃(y, n), where${{D_{1}\left( {y,n} \right)} = {\frac{1}{w}{\sum\limits_{x}\; {{{F\left( {x,y,n} \right)} - {F\left( {x,{y - 2},n} \right)}}}}}},{{D_{2}\left( {y,n} \right)} = {\frac{1}{w}{\sum\limits_{x}\; {{{F\left( {x,y,n} \right)} - {F\left( {x,{y - 1},n} \right)}}}}}},{{D_{3}\left( {y,n} \right)} = {\frac{1}{w}{\sum\limits_{x}\; {{{F\left( {x,y,n} \right)} - {F\left( {x,y,{n - 1}} \right)}}}}}},$

and where c₁ and c₂ are some parameters.

Experimental validation shows that D(y, n) gives consistently highervalues on original lines of de-interlaced content and therefore usingthe following measure of de-interlacing quality is suggested:

${M = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}\; {{D\left( {y,n} \right)} \cdot \left( {- 1} \right)^{({y + n})}}}}}},$

where S is some sub-grid of vertical-temporal pixel grid such that Scontains the equal number of points from odd and even grids.

The measure is now generalized to scaled video signals as follows. Ifthe video is de-interlaced and scaled factor β then for any αsufficiently close to β, D(y, n) as the function of y, should containessential amount of the highest spatial-temporal harmonic

g(α, y, n)=c_(α) exp(iπ(α·y+n)),

where c_(α) is the amplitude coefficient which depends on the croppingmethod (if the video was cropped after scaling) and the visibility ofde-interlacing artifacts.

In order to find the scaling ratio c_(α) of de-interlaced video weevaluate the amplitude of the scaling spectrum ρ(α)

${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$

for a given set/interval of candidate a where S is some sub-grid ofvertical-temporal pixel grid such that S contains the equal number ofpoints from odd and even grids. In another alternative exemplaryembodiment the discrimination between de-interlaced and progressivevideo can be made on the basis of variance σ and the absolute maximum Mof the power spectrum ρ(α). If the video is de-interlaced and scaledwith factor β then the scaling spectrum ρ(α) as function of a shouldhave a well pronounced peak at α=β, and hence σ is small and M is high.For originally progressive sequences, the spectrum is flat, andtherefore σ is large and M is relatively low, as illustrated in FIG. 6.

Based on these experimental results, we propose the followingdiscriminating measure

DISC_(μ)=(I+(10^(−3.35)*σ⁴ /M)²)⁻¹,

which represents deviations from the discriminating line on FIG. 2? Themeasure takes values in [0, 0.5] for 96% of tested progressive frames,and values in (0.5, 1] for 94% of de-interlaced frames providing quiterobust classification.

The provided DISC detector has been successfully tested in a number ofvideo processing applications. Some of them are described below, thoughthe list is not exhaustive:

1) Film cadence detection. In film cadence detection, it is essential toidentify the presence and location of repeated frames. Unfortunately,due to poor de-interlacing, repeated frames can differ with respect toeach other. Together with compression artifacts, this makes filmdetection quite a challenging task. Since the DISC value indicates theamount of de-interlacing artifacts, it can be used to determine how muchframe difference can be tolerated to classify two de-interlaced framesas a repeat.

2) Sharpness enhancement control. If a sharpness enhancement algorithmis applied to a video with visible de-interlacing artifacts, it clearlyincreases the sharpness of the artifacts as well. Since the DISC valuecorrelates with visibility of de-interlacing artifacts, it can be usedto adjust the parameters of sharpness enhancement algorithms.

3) Post-processing of film content. For poorly de-interlaced filmcontent, improve the quality can be improved by re-de-interlacing. Sincethe DISC detector provides the positions of original lines, repeatedframes can be improved by line-wise averaging of them with weightsproportional to the proximity to original lines in respective frames.Although scaling prevents a perfect reconstruction of the film content,experiments have shown significant improvements in the case of up-scaledvideo content due to overscan;

4) Quality evaluation. Since the DISC value correlates with visibilityof de-interlacing artifacts, it can be used for comparison of differentde-interlacing techniques and for quality evaluation of particularde-interlacers, see FIG. 7;

The detector can be used in various applications and such as otherinteresting applications that are possible include:

5) Re-(de)-interlacing. Suppose the front end receives a video inprogressive format and has a good de-interlacer on board. It is possibleto tune the DISC detector such that it can robustly identify whether thevideo is occasionally de-interlaced with pure line insertion or pureline repetition. Then if there is no scaling detected, it is possible tointerlace video (select original lines) and re-de-interlace it with thede-interlacer of the present invention.

6) Video compression. The DISC detector can be used to select theoptimal compression strategy. For example, if the video is poorlyde-interlaced, at least one of a higher compression ratios and extraquality can be achieved if it is compressed as interlaced video. Notethat proper re-interlacing is only possible for non-scaled video, as itrequires the positions of original and interpolated lines to be locatedon an integer grid.

Many of the attendant features will be more readily appreciated byreferring to the following detailed description considered in connectionwith the accompanying drawings.

FIG. 1 is an example usage of the DISC detector according to the presentinvention in a conventional video chain; and

FIG. 2 illustrate characteristics of a spectra for 60 video sequenceseach of ˜100 frames scaled by a factor of 0.96, the light gray pointscorrespond to 30 sequences de-interlaced with a state-of-the-artde-interlacer, the dark gray points to 30 originally progressivesequences, and the line log(y) =2 log(x)−3.35 efficiently discriminatesbetween de-interlaced and progressive content since only 4% ofprogressive, and 6% if de-interlaces frames are misclassified;

FIG. 3 is an example frame from a de-interlaced sequence a) and enlargedparts of it consisting of b) original lines only, and c) restored linesonly. Clearly visible is that c) is substantially more blurred than b);

FIG. 4 illustrates an example of a table of scaling interval andcorresponding discrimination functions defined on an integer grid.

FIG. 5 is an example of a sample of D1(y, n) computed on first 80 linesof a de-interlaced image. D1(y, n) computed on original lines gives, ingeneral, positive values while D1(y, n) computed on interpolated linesgives in general, negative values;

FIG. 6 is an example of two scaling spectra of a sample frame sequence,scaled with ratio 1.05. where top: de-interlaced with a state-of-the-artde-interlacer; bottom: original progressive and the top spectrum is verynarrow, the dominant frequency has large amplitude (1900 against X10,the maximal amplitude of the spectrum of original progressive frame),and it correspond to the scaling ratio 1.05;

FIG. 7 illustrates an example of quality comparison of differentde-interlacers: a) line average with DISC value >0.9, b) a motioncompensative de-interlacer with DISC value of 0.5, and c) theprogressive original with DISC value <0.3 and it can be seen that inthis case DISC value correlates with the visibility of de-interlacingartifacts;

FIG. 8 a illustrates an example of original sequences in a) 2:2 filmcadence with two segments indicated, and b) 3:2 film cadence with onesegment;

FIG. 8 b illustrates an example of the processing in the columns is a)de-interlacing using a motion adaptive de-interlacer and subsequentscaling, b) frames are averaged with their repeats, eliminating most ofthe detail flicker, c) (re)- de-interlacing using the DISC detector andd) the original progressive sequence;

FIG. 9 illustrates an example of an apparatus for the detection ofde-interlaced vides, according to a first embodiment of the presentinvention.

A low-cost detector and detection method are provided that can classifyvideo in progressive format as being de-interlaced or originallyprogressive. Experiments have confirmed the robustness of the detectorand method of the present invention in discriminating betweende-interlaced and progressive content, as well as its added value in thedescribed applications.

A low-cost detector and detection method are provided that can classifyvideo in progressive format as being de-interlaced or originallyprogressive. Experiments have confirmed the robustness of the detectorand method of the present invention in discriminating betweende-interlaced and progressive content, as well as its added value in thedescribed applications.

Interlacing is widely used to reduce the bandwidth of video signals. Ithas become an integral part of PAL and NTSC standards and is included insome HD standards. The basic idea of interlacing is simple: byalternating the transmission of even and odd lines of consecutiveframes, the resulting bandwidth is halved with respect to the original,so-called progressive, video signal.

The concept of de-interlacing, i.e. the reverse process in which themissing lines are restored, appeared with the first CRT displays withdoubled vertical resolution and became an essential part of theinherently progressive flat panel displays. Basically, de-interlacingalgorithms recreate missing lines from their existing spatial and/ortemporal neighbors:

$\begin{matrix}\begin{matrix}{{F_{0}\left( {x,y,n} \right)} =} & {{F_{i}\left( {x,y,n} \right)},} & \left( {{\left( {y + n} \right){mod}\; 2} = 0} \right. \\\; & {{F\left( {x,y,n} \right)},} & {otherwise}\end{matrix} & (1)\end{matrix}$

with F(x, y, n) being the pixels at spatial position (x, y), fieldnumber n existing only on vertical positions ((y+n) mod 2=0), andF_(i)(x, y, n) being the interpolated pixels. In general, de-interlacingis a particularly efficient way of increasing the spatial resolution ofvideo, as advanced de-interlacers are able to double the verticalresolution of the video signal by recovering the original information.

However, the quality of modern de-interlacers varies greatly. With thede-interlacer being typically located in the front of the video chain,any artifacts generated here will greatly affect algorithms in the restof the video chain. Furthermore, with the video chain being split overvarious devices and/or IC's, it is typically not known for videoprocessing algorithms if the content was previously de-interlaced, andif so, what quality and/or artifacts to expect. In the case of externalde-interlacers, such as e.g. set-top boxes or DVD players withprogressive output, such information is lost even to the front-end videoprocessing.

Any knowledge on the type of video signal, i.e. de-interlaced orprogressive, and the actual quality of the de-interlaced result istherefore highly desirable. The present invention provides a low-costsystem and method which is able to classify the input as de-interlacedor progressive for a broad range of de-interlacers without the need fora reference signal. Moreover, this algorithm is robust for spatialscaling and therefore referred to as DISC detector (De-Interlaced andSCaled). Furthermore, it can indicate the position of original andinterpolated lines and the scaling factor.

In the following detailed disclosure the detector is first describedfollowed by a discussion of its results. Possible application areas arethen presented.

Based on the observation that de-interlacing quality has a large impacton the overall quality of the video chain, it becomes apparent that adetector is desirable that indicates how much a given video signalresembles true progressive video content. If it is also assumed thathigher de-interlacing quality results in a higher resemblance of thede-interlaced signal to the original progressive signal, such a detectorwould not only allow for the differentiation of progressive andde-interlaced content, but also automatically give an indication on thequality of the de-interlacing.

It seems most obvious to base such a detector upon the calculation ofthe Mean Square Error (MSE) between a given de-interlaced video signaland an original progressive video signal. However, such a detector isunsuitable for real-time applications, as the calculation of the MSErequires a reference video signal. By contrast, a no-reference detectordoes not require any original reference, and can therefore be includedin a real-time system. This enables the usage of the detector in videochains as, e.g., depicted in FIG. 1, where the output of the detector isused in the so-called video engine.

The DISC detector which is described in the following sections, is ano-reference detector that is based upon two simple observations:

1. Given the fact that interpolated lines are computed from originallines, their entropy is typically lower.

2. The positions of original and interpolated lines are complementaryand their positions alternate from frame to frame, i.e. their positionsform a checkerboard pattern on the vertical-temporal plane.

The former observation is based upon the fact that interpolated linesare computed from the original lines according to the de-interlacingalgorithm, and therefore basically contain less information. This meansthat the interpolated pixels should be, in general, more correlated withtheir neighbors than the original pixels, and hence, the statisticalcharacteristics of the interpolated pixel grid should, in general,differ from the statistical characteristics of the original grid.Moreover, the larger this difference is, the higher the chance thatde-interlacing artifacts become visible. On the other hand, inoriginally progressive video signals, there should be no noticeablestatistical difference between even and odd grids.

The latter observation suggests to divide all lines of a video sequencein two vertical-temporal grids, one so-called even grid {(y, n)|(y+n)mod 2=0}, where y is the line number and n is the frame, is the grid oforiginal lines, and the complementary odd grid {(y, n)|(y+n) mod 2=1}.If the positions of original lines fall on the even grid, then thepositions of interpolated lines fall on odd grid, and visa versa, if theeven grid is the grid of interpolated lines then the odd grid is thegrid of original lines. The above observations lead to the followingconclusion: if a discriminating function exists such that the average ofthis function computed on the even grid differs significantly from theaverage of this function computed on then odd grid, then the video isde-interlaced with a high probability. Furthermore, the larger thisdifference is, the higher the chance that de-interlacing artifactsbecome visible.

The above concept can be illustrated by considering the de-interlacedoutput of a mid-range de-interlacer as shown in FIG. 3. If one separatesthe de-interlaced output into two images, one consisting of the originallines and one consisting of the interpolated lines, then one can clearlyobserve that the second image is more blurred, i.e. even and odd linesin the imperfectly de-interlaced frames have different high-frequencystatistics.

The simplest discriminating function which can capture the differencesdepicted in FIG. 3 is in essence a vertical high-pass filter as definedby:

${{D\left( {y,n} \right)} = {\frac{1}{w}{\sum\limits_{x}{{{F_{0}\left( {x,y,n} \right)} - {F_{0}\left( {x,{y - 2},n} \right)}}}}}},$

where w is the image width. However, the following modification resultsin a higher contrast or differentiation

${D_{1}\left( {y,n} \right)} = {\frac{L}{w}{\sum\limits_{x \in {L \cdot N_{o}}}\left( {{{sign}\left( {\Delta_{{- 2},0}\left( {x,y,n} \right)} \right)} - {{sign}\left( {\Delta_{{- 2},0}\left( {x,{y + 1},n} \right)} \right)}} \right)}}$

where w is the image width; in x∈L·N_(o) we take x=0, L , 2 L , 3 L , .. . ; sign(z) is the sign function:

${{sign}(z)} = \left\{ \begin{matrix}{1,} & {{z > 0},} \\{0,} & {{z = 0},} \\{{- 1},} & {{z < 0},}\end{matrix} \right.$

and Δ_(a,b)(x, y, n) is the local difference defined as:

${{\Delta_{a,b}\left( {x,y,n} \right)} = {\frac{1}{L}{\sum\limits_{j = 0}^{L - 1}{{{F_{0}\left( {{x + j},y,n} \right)} - {F_{0}\left( {{x + j},{y + a},{n + b}} \right)}}}}}},$

where L is experimentally derived as 3.

One can see that D₁(y, n) is indeed derived from D(y, n) since D₁(y, n)is a normalized difference between Δ_(−2,0) (x, ·, n) computed oncurrent line (y, n) and the line below (y+1, n), and since Δ_(−2,0)(x,y, n) is the localized version of D(y,n) around horizontal position y.So we see that on original lines Δ_(−2,0) (x, ·, n) is, in general,larger, and hence D₁(y, n) is positive, while on interpolated linesΔ_(−2,0)(x, ·, n) is, in general, smaller, and hence D₁(y, n) isnegative. This is illustrated in FIG. 5, which shows a sample of D₁(y,n) computed on the first 80 lines of a de-interlaced image. Smallvertical details in the image, however, can cause deviations from thisrule.

From a practical point of view, D₁(y, n) efficiently discriminatesbetween the original and interpolated grids for the majority ofde-interlacers. However, two rather primitive de-interlacers form theexception to this rule, as here the original and interpolated lines areidentical modulo a spatial temporal shift:

1. Pure line insertion. In this de-interlacing method, the interpolatedlines are copies of the lines with an identical vertical position in theprevious image. For example, if the even grid is the original grid, thenthe interpolated samples in Equation (1) are defined by:

F _(i)(x, y, n)=F(x, y, n−1), (y, n) in odd grid.

Since the two pixel grids, one consisting of even lines the other of oddlines, consist both of original lines (from different frames), thediscriminating function D₁(y, n) cannot discriminate them. However, thefollowing discriminating function matches this de-interlacing methodbetter:

${D_{2}\left( {y,n} \right)} = {\frac{{\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{0,{- 1}}\left( {x,y,n} \right)}} + ɛ}{{\sum\limits_{x \in {L \cdot N_{o}}}\left( {{\Delta_{0,{- 1}}\left( {x,y,n} \right)} + {\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{0,{- 1}}\left( {x,{y + 1},n} \right)}}} \right)} + {2 \cdot ɛ}} - {0.5.}}$

Indeed, since Δ_(0, −1)(x, y, n) is zero, (or almost zero, depending onnoise) on the interpolated grid D₂(y, n) is, in general, negative on theinterpolated grid. On the other hand, on the original grid, D₂(y, n) ispositive and proportional to inter-frame difference. Hence, if twoconsecutive frames are locally different, i.e. resulting in egg-slicingartifacts, then the averaging of D₂(y, n) on the even grid differsseverely from the averaging on the odd grid. In this case, the grid withthe positive average is the original grid.

2. Pure line repetition. In this de-interlacing method, the interpolatedlines are copies of the original lines above them. For example, if theeven grid is the original grid, then the interpolated samples inEquation (1 ) are defined by:

F _(i)(x, y, n)=F(x, y−1, n), (y, n) in odd grid.

Again, the discriminating function D₁(y, n) cannot discriminate betweenthe odd and even pixel grid. Moreover, D₂(y, n) represents the localvariation in the distance between the original lines of current and ofprevious frames, and hence can neither help in discriminating betweenoriginal and interpolated lines. The proper discriminating function forthe line repetition de-interlacer is:

${D_{3}\left( {y,n} \right)} = {\frac{{\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{{- 1},0}\left( {x,y,n} \right)}} + ɛ}{{\sum\limits_{x \in {L \cdot N_{o}}}\left( {{\Delta_{{- 1},0}\left( {x,y,n} \right)} + {\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{1,0}\left( {x,y,n} \right)}}} \right)} + {2 \cdot ɛ}} - {0.5.}}$

Observe that Δ_(−1,0)(x, y, n) is zero (or almost zero, depending onnoise) on the interpolated grid, and hence again D₂(y, n) is, ingeneral, negative on the interpolated. On the original grid, Δ_(−1,0)(x,y, n) is positive and proportional to amount of high frequent detail inthe image. Hence, if the frame is not completely homogeneous andstair-casing artifacts due to line repetition can be observed, then theaveraging of this discriminating function on the original grid ispositive and negative on the interpolated grid.

The individual discriminating functions can be combined into a combineddiscriminating function to cover a wide range of possible de-interlacingalgorithms by the following summation:

${{D\left( {y,n} \right)} = {\sum\limits_{i}{\kappa_{i}{D_{i}\left( {y,n} \right)}}}},$

where κ_(i) are mixing parameters. In practice, some contributions toD_(i)(y, n) give, in general, higher values on the original grid, andthe remaining D_(i)(y, n) contribute as noise. The followingexperimentally derived values are provided: κ₁=1 and κ₂, κ₃ smallenough, (e.g., κ₂=κ₃=0.2) to balance the inference between D_(i)(y, n).Indeed, one can see that D₂(y, n) and D₃(y, n) are more efficient thanD₁(y, n) on the respectively de-interlaced content. Hence, if the videois de-interlaced with pure line-repetition or pure line-insertion, then,due to the efficiency of D₂(y, n) and D₃(y, n), we can achieve a highSNR even for small κ₂ and κ₃ . If the video is de-interlaced with othermethods, then D₂(y, n) and D₃(y, n) do not contribute much to noise dueto the low κ₂ and κ₃.

It should be noted that both pure line insert and pure line repeatde-interlacers are quite rarely used since they produce highly visibleartifacts in case of motion and vertical detail, respectively.Furthermore, motion adaptive de-interlacers, which combine line insertand line repeat depending on the detected motion, can be already beeffectively detected with the discriminating function D₁(y, n). Thisindeed justifies the above proposed values for κ_(i).

Note that the implementation of D₁(y, n) requires two line memories,D₂(y, n) requires one frame memory, and D₃(y, n) one line memory. Hence,to limit the implementation cost of the detector of the presentinvention, one could implement the present invention based purely onD₁(y, n), or D₁(y, n) and D₃(y, n).

Since the average of D(y, n) computed on the even grid differssignificantly from the average of this function computed on then oddgrid we suggest you use the following measure of de-interlacing quality

${M = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D\left( {y,n} \right)} \cdot \left( {- 1} \right)^{({y + n})}}}}}},$

where S is some sub-grid of vertical-temporal pixel grid such that Scontains the equal number of points from odd and even grids. The formulaabove returns one number for a given video sequence. For streamingapplications it makes sense to compute the de-interlacing qualitymeasure recursively as

${M_{n + 1} = {{{\left( {1 - ɛ} \right) \cdot M_{n}} + {{ɛ \cdot {S_{n + 1}}^{- 1}}{\sum\limits_{{({y,n})} \in S_{n + 1}}{{D\left( {y,n} \right)} \cdot \left( {- 1} \right)^{({y + n})}}}}}}},$

where S_(n) is some sub-grid of the current frame and ε∈(0,1] is thetemporal consistency parameter. If ε is set close to one then M_(n)indicates only the quality measure for current frame, if ε is smallerthan one, M_(n) also takes previous frames into account.

The invention is generalized to scaled video signals as follows. Due tothe scaling, the difference between the original and progressive lineschanges. Therefore, the scaling should be adjusted to the discriminationfunctions D_(i)(y, n). In order to do this, for scaling factor α, wereplace Δ_(a,b)(x, y, n) in D_(i)(y, n) by its scaled analogΔ_(α·a,b)(x, y, n) where interpolation is used to obtain image values atthe non-integer positions. The discriminating functions D₁(y, n), D₂(y,n) and D₃(y, n) become

${{D_{1,\alpha}\left( {y,n} \right)} = {\frac{L}{w}{\sum\limits_{x \in {L \cdot N_{o}}}\left( {{{sign}\left( {\Delta_{{{- 2} \cdot \alpha},0}\left( {x,y,n} \right)} \right)} - {{sign}\left( {\Delta_{{{- 2} \cdot \alpha},0}\left( {x,{y + 1},n} \right)} \right)}} \right)}}},{{D_{2,\alpha}\left( {y,n} \right)} = {\frac{{\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{0,{- 1}}\left( {x,y,n} \right)}} + ɛ}{{\sum\limits_{x \in {L \cdot N_{o}}}\left( {{\Delta_{0,{- 1}}\left( {x,y,n} \right)} + {\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{0,{- 1}}\left( {x,{y + \alpha},n} \right)}}} \right)} + {2 \cdot ɛ}} - 0.5}},{{D_{3,\alpha}\left( {y,n} \right)} = {\frac{{\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{{- \alpha},0}\left( {x,y,n} \right)}} + ɛ}{{\sum\limits_{x \in {L \cdot N_{o}}}\left( {{\Delta_{{- \alpha},0}\left( {x,y,n} \right)} + {\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{\alpha,0}\left( {x,y,n} \right)}}} \right)} + {2 \cdot ɛ}} - {0.5.}}}$

Observe that the video vertically scaled with coefficient β can bedetected by discriminating functions D_(i,α)(y, n), if α is sufficientlyclose to β. This allows us to use only discriminating functionsD_(i,αa)(y, n) defined on integer grid. For practical purposes, it issufficient to consider a corresponding to 0%-7% overscan for SDmaterial, and the overscan combined with possible up-scaling from 576p/480 p/720 p to 720 p/1080 p lines for HD material. This provides thefollowing intervals of interest for α. It is [1.0, 1.07] for SD, [1.0,1.07], [1.25, 1.34] and [1.5, 1.61] for 720 p, and [1.0, 1.07], [1.5,1.61], [1.87, 2.01] and [2.25, 2.41] for 1080 p. Since for any αdiscriminating functions (8) are allowed to take image values at thenearest integer positions without much loss in robustness, for everyinterval of interest, there can be found a fixed set of most suitablediscriminating functions. The discriminating functions corresponding toabove intervals of a are given in Table 1 shown in FIG. 4. Thediscriminating functions defined above work best for any α≧1. However,for vertically downscaled videos with factor a <1, due to the merging oforiginal and interpolated grids, these functions become less effective.If α<0.95 then D_(1,α)(y, n) is replaced by its more efficient temporalanalog D_(1,α)(y, n) (though it is less efficient forα>0.95)

${D_{1,\alpha}^{\prime}\left( {y,n} \right)} = {\frac{L}{w}{\sum\limits_{x \in {L \cdot N_{o}}}\left( {{{sign}\left( {\Delta_{{{- 2} \cdot \alpha},0}\left( {x,y,n} \right)} \right)} - {{sign}\left( {\Delta_{{{- 2} \cdot \alpha},0}\left( {x,y,{n - 1}} \right)} \right)}} \right)}}$

As before, the sum is analyzed

${{D_{\alpha}\left( {y,n} \right)} = {\sum\limits_{i}{\kappa_{i}{D_{i,\alpha}\left( {y,n} \right)}}}},$

where D_(2,α)(y, n) can be excluded without substantially sacrificingdetection quality.

If the video is de-interlaced and scaled factor β then for any αsufficiently close to β, D_(α)(y, n) as the function of y, shouldcontain essential amount of the highest spatial-temporal harmonic

g(α, y, n)=c _(α) exp(iπ(α·y+n)),

where c_(α) is the amplitude coefficient which depends on the croppingmethod (if the video was cropped after scaling) and the visibility ofde-interlacing artifacts.

In order to find the scaling ratio c_(α) of de-interlaced video weevaluate the amplitude of the scaling spectrum ρ(α)

${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$

for a given set/interval of candidate a where S is some sub-grid ofvertical-temporal pixel grid such that S contains the equal number ofpoints from odd and even grids.

If the video is de-interlaced and scaled factor β then the scalingspectrum ρ(α) as function of α should have a well pronounced peak atα=β.

FIG. 6 illustrates the amplitude of two scaling spectra of a samplevideo frame scaled with ratio 1.05. The top sequence is de-interlacedwith an advanced de-interlacer; the bottom is original progressive. Thefirst spectrum is very narrow, the dominating frequency has significantamplitude, and it corresponds to the scaling ratio.

FIG. 6 suggests discriminating de-interlaced and progressive spectrabased on the amplitude of dominating frequency

${{Max} = {\max\limits_{\alpha}{\rho (\alpha)}}},$

and the spectrum variance

${{Var} = \sqrt{{\frac{1}{\left\{ \alpha \right\} }{\sum\limits_{\{\alpha\}}\left( {\rho (\alpha)} \right)^{2}}} - \left( {\frac{1}{\left\{ \alpha \right\} }{\sum\limits_{\{\alpha\}}{\rho (\alpha)}}} \right)^{2}}},$

where {α} is the set/interval of candidate scaling factors, |{α}| is thetotal number of frequencies in this set/interval. FIG. 2 is a plot onloglog scale (maximum, variance) of points for a number of video framessamples from different sequences and scaled with ratio 0.96. The toppoints correspond to de-interlaced sequences, and the bottom points tooriginal progressive. Points are grouped in two distinct sets which canbe efficiently separated by line

log(Max)=c ₁·log(Var)+c ₂,

or by

Max=e ^(c) ² (Var )^(q),

on normal scale where c₁ and c₂ are come parameters.The video is classified as progressive if

Max<e ^(c) ² (Var )^(c),

otherwise video is classified as de-interlaced and scaled with factor

$\hat{\beta} = {\underset{\alpha}{argmax}{{\rho (\alpha)}.}}$

The proximity with the discriminating line Max=e^(c) ² (Var )^(c) ¹ ,can be converted to a so-called de-interlaced and scaled (DISC) measure

${M_{DISC} = \frac{{Max} \cdot ({Var})^{- c_{1^{\prime}}}}{e^{c_{2}} + {{Max} \cdot ({Var})^{- c_{1^{\prime}}}}}},$

which takes values close to 0 on progressive video, values close to oneon de-interlaced videos, and ˜0.5 on the discriminating line.

The positions corresponding to original lines in the scaled content canbe determined as maxima of

cos(π(β y+n)+φ( β)),

i.e.

${y_{k} = {\frac{1}{\beta}\left( {{2k} - \frac{\phi (\beta)}{\pi} - n} \right)}},$

k=0,1,2 . . . where φ(β) is the phase of the scaling spectrum

${\phi (\beta)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\beta}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\beta \cdot y} + n} \right)}} \right)}}}} \right)}.}$

The detection method described above has natural limitations. First itis not very robust for scaling factors below 0.95. Second, if the methodcan detect the presence of de-interlacing and scaling, it cannotdiscriminate between the scaling with ratio β=1+ε and ratio β=1−ε.Indeed, since

g(1+ε, y, n)=c _(α) exp(iπ((1+ε)·y+n))=−c _(α)exp(πi((1−ε)·y+n))=−g(1−ε, y, n),

then up-scaling with β=1+ε and down scaling with β=1−ε will cause theappearance of the same spatial-temporal harmonic in D_(β)(y, n)(differences in phase are not discriminated which can be caused bycropping or different phase of interlacing). If the same discriminatingfunction D_(α)(y, n) is used for α˜l then the scaling spectrum ρ(α) isalso symmetric around α˜1.

$\begin{matrix}{{\rho \left( {1 + ɛ} \right)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{1 + ɛ}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\left( {1 + ɛ} \right) \cdot y} + n} \right)}} \right)}}}}}} \\{= {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{{D_{1 + ɛ}\left( {y,n} \right)} \cdot \left( {- 1} \right)^{n + y}}{\exp \left( {{- {\pi ɛ}}\; y} \right)}}}}}} \\{= {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{{D_{1 - ɛ}\left( {y,n} \right)} \cdot \left( {- 1} \right)^{n + y}}{\exp \left( {{\pi ɛ}\; y} \right)}}}}}} \\{= {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{1 - ɛ}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\left( {1 + ɛ} \right) \cdot y} + n} \right)}} \right)}}}}}} \\{= {{\rho \left( {1 - ɛ} \right)}.}}\end{matrix}$

Below, the most straightforward applications of the DISC detector arediscussed. This list in not exhaustive, however, and other interestingapplications may still exist.

1) Quality evaluation. Since the DISC value correlates with visibilityof de-interlacing artifacts, it can be used for comparison of differentde-interlacing techniques and for quality evaluation of particularde-interlacers, see FIG. 7;

2) Video compression. The DISC detector can be used to select theoptimal compression strategy. For example, if the video is poorlyde-interlaced, at least one of a higher compression ratio and extraquality can be achieved if it is compressed as interlaced video. Notethat proper re-interlacing is only possible for non-scaled video, as itrequires the positions of original and interpolated lines to be locatedon an integer grid;

3) Film cadence detection. In film cadence detection, it is essential toidentify the presence and location of repeated frames. Unfortunately,due to poor de-interlacing, repeated frames can differ with respect toeach other. Together with compression artifacts, this makes filmdetection quite a challenging task. Since the DISC value indicates theamount of de-interlacing artifacts, it can be used to determine how muchframe difference can be tolerated to classify two de-interlaced framesas a repeat.

4) Sharpness enhancement control. If a sharpness enhancement algorithmis applied to a video with visible de-interlacing artifacts, it clearlyincreases the sharpness of the artifacts as well. Since the DISC valuecorrelates with visibility of de-interlacing artifacts, it can be usedto adjust the parameters of sharpness enhancement algorithms.Furthermore, since the locations of the original and interpolated pixelsare known, the algorithm can be altered to apply more sharpnessenhancement on the original lines and less on the interpolated lines.

5) Re-(de)-interlacing. Suppose the front end receives a video inprogressive format and has a good de-interlacer on board. It is possibleto tune the DISC detector such that it can robustly identify whether thevideo is occasionally de-interlaced with pure line insertion or pureline repetition. Then if there is no scaling detected, it is possible tointerlace video (select original lines) and re-de-interlace it with thede-interlacer of the present invention.

6) Post-processing of film content. The DISC detector is especiallyefficient in combination with film detector. The film detector alonealready provides an excellent opportunity for temporal post-filtering ofpoorly de-interlaced and scaled film content. If n frames are classifiedas n copies of one original film frame, subject compression andde-interlacing artifacts, each of these n frames can be replaced by thepixel-wise average of these frames. This simple operation removes themost annoying detail flicker and restores some high frequencies lost inindividual de-interlaced frames. However the output is still not assharp as the original. The usage DISC detector in combination with filmdetector can give us further improvements since it is possible todetermine the approximate positions the original lines. Due to possiblescaling some of the output lines fall on the original lines, and somefall in-between. The idea is to bias the pixel-wise average of repeatstowards the original lines so that the distribution of weights becomesdependent on parity and the vertical position of the current frame.Hence, at vertical positions where the output pixels fall on theoriginal lines perfect reconstruction is possible. In this case theweights are concentrated either on odd or on even frame repeatsdepending on which contain the original line, i.e., there-de-interlacing is actually done. If there is no scaling and at leastone repeat then the perfect reconstruction is possible for the wholeframe. If there is scaling and the output pixels fall preciselyin-between two original lines then we assign equal weights in thepixel-wise average as the best possible solution. Hence, in the case ofscaling when the output lines periodically fall on and in-between theoriginal lines improvement over the flat pixel-wise average is alsoperiodically changes with vertical positions. However this periodicitybeing static does not disturb the perception of the general qualityimprovement. FIGS. 8 a and 8 b illustrate the advantages ofre-de-interlacing over the flat pixel-wise average of the detected framerepeats.

FIG. 9 illustrates an example of an apparatus that comprises modulesthat perform:

-   -   a) Discrimination Function Module (901): evaluation of so-called        discriminating function D(y, n) for given set of lines (y, n)∈S        where discriminating function D(y, n) is based on local spatial        and/or temporal pixel correlations;    -   b) Grid Determination Module (902): determination of an even        grid to consist of the lines with line number y in frames with        frame number n where sum y+n is even number and an odd grid to        consist of the lines with line number y in frames with frame        number n where sum y+n is odd    -   c) Averaging Module (903) computation of an average A1 of        discriminating function D(y, n) on subset of pixels belonging to        even grind and an average A2 of discriminating function D(y, n)        on subset of pixels belonging to odd grid where the even grid        consist of the lines with line number y in frames with frame        number n where sum y+n is even number and the odd grid consist        of the lines with line number y in frames with frame number n        where sum y+n is odd.    -   d) Comparison/classification Module (904): Comparison of the        averages A1 and A2 and based on their difference computing and        outputting a de-interlacing quality measure; and classifying the        even grid as the grid of original lines if A1>A2, otherwise        classifies odd grid as grid of original lines.

While various embodiments herein have been discussed with reference toDISC, these are exemplary and for illustrative purposes only. Thegeneral concepts of DISC can be realized with equivalent component.Furthermore, the DISC can be implemented using hardware, software or acombination thereof. The variety of devices that can benefit from DISCare too numerous to fully elaborate but include those mentioned in theabove disclosure, at a minimum, as well as Blue Ray players, DVDplayers, televisions and displays, personal computers, portable videoplayers, codecs, etc. Therefore, it will be appreciated by one skilledin the art that various changes can be made to the DISC disclosed hereinwithout departing from the spirit and scope of the invention as definedby the appended claims and their equivalents.

1-8. (canceled)
 9. A method for detecting de-interlacing for scaledvideo, comprising: for every scaling ratio α of a given set α∈Icomputing a measure, ρ(α) which indicates the visibility ofde-interlacing artifacts given that the content was scaled with verticalfactor α, by performing the following: a. evaluating a pre-setdiscriminating function D_(α)(y, n) for a given set of lines (y, n)∈S,and b. convolving the discriminating function D_(α)(y, n ) with apre-set parity function which uses α as a scaling coefficient; analyzingthe measure ρ(α) and defining a de-interlacing quality measure Q that isinversely proportional to visibility of peak(s) in ρ(α) as a function ofα; analyzing the measure ρ(α) and defining the most probable verticalscaling ratio β as α corresponding to the maximum of ρ(α) ; and definingthe positions corresponding to original lines in the scaled content asmaxima ofcos(π(βy+n)+φ(β))
 10. The method of claim 9 wherein evaluating furthercomprises evaluating pre-set discriminating function D_(α)(y, n) forgiven set of lines (y, n)∈S where discriminating function D_(α)(y, n) isbased on local spatial and/or temporal pixel correlations.
 11. Themethod of claim 9, wherein where the pre-set discriminating functionD(y, n) is based on a weighted sum of different specific discriminatingfunctions.
 12. The method of claim 9 where de-interlacing qualitymeasure Q is computed as function of variance and the maximum of thescaling spectrum.
 13. The method of claim 10 wherein convolving furthercomprises convolving the evaluated discriminating function D_(α)(y, n )with pre-set parity function exp(−iπ(α·y+n)) where α is a scalingcoefficient, y is a line number, and n is a frame number to determinethe measure ρ(α)${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$and phase${\phi (\alpha)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}} \right)}.}$14. The method of claim 9, wherein convolving further comprisesconvolving the evaluated discriminating function D_(α)(y, n ) withpre-set parity function exp(−iπ(αy+n)) where α is a scaling coefficient,y is a line number, and n is a frame number to determine the measureρ(α)${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$and phase${\phi (\alpha)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}} \right)}.}$15. The method of claim 16, wherein where the pre-set discriminatingfunction D(y, n) is based on a weighted sum of different specificdiscriminating functions.
 16. The method of claim 15 wherein the pre-setdiscriminating function D(y, n) further comprises at least one ofspecific discriminating function proportional to a relative/additionalamount of high frequency detail in the given line n with respect to aspecific neighboring line in an analyzed previous or next frame.
 17. Anapparatus for detection of de-interlacing for scaled video having avertical scaling factor α, comprising: a de-interlacing artifactvisibility detection module comprising sub modules: a. a discriminationfunction module that performs a pre-set discriminating function D_(α)(y,n) on a subset of the set of lines (y, n)∈S where n is a specific framenumber and y is a line number within the specified frame, and b. aconvolving discriminating function module that convolves thediscriminating function D_(α)(y, n) using a pre-set parity functionwhich uses α as a scaling coefficient to obtain ρ(α) which indicates thevisibility of de-interlacing artifacts; a de-interlacing qualitydefinition and analysis module that analyzes the measure ρ(α) anddefines a de-interlacing quality measure Q that is inverselyproportional to visibility of peak(s) in ρ(α) as a function of α,defines the most probable vertical scaling ration β as a correspondingto the maximum of ρ(α) and defines the positions corresponding tooriginal lines in the scaled content as maxima of cos(π(β y+n)+φ(β)).18. The apparatus of claim 17 wherein evaluating further comprisesevaluating pre-set discriminating function D_(α)(y, n) for given set oflines (y, n)∈S where discriminating function D_(α)(y, n) is based onlocal spatial and/or temporal pixel correlations.
 19. The apparatus ofclaim 17, wherein where the pre-set discriminating function D(y, n) isbased on a weighted sum of different specific discriminating functions.20. The apparatus of claim 17 where de-interlacing quality measure Q iscomputed as function of variance and the maximum of the scalingspectrum.
 21. The apparatus of claim 17 wherein convolving furthercomprises convolving the evaluated discriminating function D_(α)(y, n)with pre-set parity function exp(−iπ(α·y+n)) where α is a scalingcoefficient, y is a line number, and n is a frame number to determinethe measure ρ(α)${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$and phase${\phi (\alpha)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}} \right)}.}$22. The method of claim 17, wherein convolving further comprisesconvolving the evaluated discriminating function D_(α)(y, n) withpre-set parity function exp(−iπ(α·y+n)) where α is a scalingcoefficient, y is a line number, and n is a frame number to determinethe measure ρ(α)${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$and phase${\phi (\alpha)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}} \right)}.}$23. The apparatus of claim 22 wherein the pre-set discriminatingfunction D(y, n) further comprises at least one of specificdiscriminating function proportional to a relative/additional amount ofhigh frequency detail in the given line n with respect to a specificneighboring line in an analyzed previous or next frame.
 24. A system forcompression/transmission/storage of a video signal where an optimalcompression/transmission/storage strategy is determined based on a valueof a de-interlacing quality measure Q computed using an included DISCdetector apparatus configured in accordance with a module that performsa pre-set discriminating function D(y, n) on a subset of the set oflines (y, n)∈S where n is a specific frame umber and y is a line numberwithin the specified frame, a grid determination module that defines anodd grid as a subset of pixels consisting of lines (y, n)∈S with linenumber y in frames with frame number n where sum y+n is odd and definingan even grid as a subset of pixels consisting of lines (y, n)∈S withline number y in frames with frame number n where sum y+n is even: anaveraging module that computes an average A1 by executing thediscriminating function D(y, n) on the pixels belonging to the even gridand average A2 by executing the discriminating function D(y, n) on a thepixels belonging to the odd grid; a comparison module that outputs ade-interlacing quality measure based on a comparison between the valuesA1 and A2; and a classification module that classifies the even grid asthe grid of original lines if A1>A2, and otherwise classifies the oddgrid as the grid of original lines, wherein the system, comprises afront-end module to receive and de-interlaced an interlaced video orreceive a progressive signal; a DISC detector apparatus configured inaccordance with claim 5 to compute and output a quality measure Q of thede-interlacing and to determine and classify even and odd grids whereinone of said even and odd grid is a grid of original lines of the inputvideo signal; a video engine to reconstruct, store in long term storage,and output to a screen the original video stream from the even and oddgrids and the quality measure Q; and a display to receive and displaythe reconstructed video stream.
 25. A system for enhancement of an inputvideo signal where the strength of enhancement depends on ade-interlacing quality measure Q and at least one of position andproximity of the original lines both computed by an included DISCdetector apparatus; a DISC detector apparatus configured in accordancewith a module that performs a pre-set discriminating function D(y, n) ona subset of the set of lines (y, n)∈S where n is a specific frame numberand y is a line number within the specified frame, a grid determinationmodule that defines an odd grid as a subset of pixels consisting oflines (y, n)∈S with line number y in frames with frame number n wheresum y+n is odd and defining an even grid as a subset of pixelsconsisting of lines (y, n)∈with line number y in frames with framenumber n where sum y+n is even; averaging module that computes anaverage A1 by executing the discriminating function D(y, n) on thepixels belonging to the even grid and average A2 by executing thediscriminating function D(y, n) on a the pixels belonging to the oddgrid; a comparison module that outputs a de-interlacing quality measurebased on a comparison between the values A1 and A2; and a classificationmodule that classifies the even grid as the grid of original lines ifA1>A2, and otherwise classifies the odd grid as the grid of originallines, the DISC detector apparatus to compute and output a qualitymeasure Q of the de-interlacing and classify even and odd grids whereinone of said even and odd grid is a grid of original lines of the inputvideo signal and to determine position/proximity of original lines; avideo engine to reconstruct and output the original video stream fromlines of at least one of the even and odd grids, at least one ofposition and proximity of said lines in said grids and the qualitymeasure Q; and a display to receive and display the reconstructed videostream.
 26. A system for motion detection in an input video signal wherethresholds and parameters are set depending on a de-interlacing qualitymeasure Q computed by an included DISC detector apparatus; a DISCdetector apparatus configured in accordance with a module that performsa pre-set discriminating function D(y, n) on a subset of the set oflines (y, n)∈S where n is a specific frame number and y is a line numberwithin the specified frame, a grid determination module that defines anodd grid as a subset of pixels consisting of lines (y, n)∈S with linenumber y in frames with frame number n where sum y+n is odd and definingan even grid as a subset of pixels consisting of lines (y, n)∈S withline number y in frames with frame number n where sum y+n is even: anaveraging module that computes an average A1 by executing thediscriminating function D(y, n) on the pixels belonging to the even gridand average A2 by executing the discriminating function D(y, n) on a thepixels belonging to the odd grid; a comparison module that outputs ade-interlacing quality based on a comparison between the values A1 andA2; and a classification module that classifies the even grid as thegrid of original lines if A1>A2, and otherwise classifies the odd gridas the grid of original lines, the DISC detector apparatus to computeand output a quality measure Q of the de-interlacing and classify evenand odd grids wherein one of said even and odd grid is a grid oforiginal lines of the input video signal and to determineposition/proximity of original lines; a video engine to reconstruct andoutput the original video stream from at least one of the even and oddgrids, the position/proximity thereof and the quality measure Q; and adisplay to receive and display the reconstructed video stream.